package com.hknc.btscale.utils;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class ConnectUtils {
    public static boolean isNetWorkConnected(Context context) {
        if (null != context) {
            ConnectivityManager connManager = (ConnectivityManager)
                    context.getSystemService(Context.CONNECTIVITY_SERVICE);
            NetworkInfo info = connManager.getActiveNetworkInfo();
            return info.isAvailable();
        }
        return false;
    }
}
